﻿@using Zj.CourseManage.DTO.Common
@model TeacherDTO
@{
    ViewData["Title"] = "教师录入";
}
<h2>@ViewData["Title"]</h2>
<hr />
<form class="form-horizontal" role="form" method="post" asp-action="Create">
    <div class="form-group">
        <label class="col-sm-2 control-label" for="name">教师姓名</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="name" id="name" placeholder="教师姓名">
            <span asp-validation-for="Name" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label" for="officeid">所属办公室</label>
        <div class="col-sm-10">
            <select class="form-control col-sm-10" id="officeid" name="officeid" asp-items='ViewBag.offices'>
                <option class="col-sm-10" value="-1">---请选择---</option>
            </select>
            <span asp-validation-for="OfficeId" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label" for="hireDate">入职日期</label>
        <div class="col-sm-10">
            <input type="date" class="form-control" name="hireDate" id="hireDate" placeholder="入职日期">
            <span asp-validation-for="HireDate" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">Submit</button>
        </div>
    </div>
</form>

@section  Scripts{
    <script>
        $("#hireDate").datepicker({
            language: "zh-CN",
            autoclose: true,//选中之后自动隐藏日期选择框
            clearBtn: true,//清除按钮
            todayBtn: true,//今日按钮
            format: "yyyy-mm-dd"//日期格式，详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
        });
    </script>
}
